package com.authine.cloudpivot.ext.eum;

@Deprecated
public enum VendorOrderStatusV1Enum {
    /**
     * 各节点状态修改(正向流程)
     * 1、客户付款->待接单
     * 2、供应商接单->交易中
     */
    ALL(0, "全部"),
    NEW(1, "新建"),
    ORDERS(2,"待接单"),
    TRANSACTION(3, "交易中"),
    CANCEL(4, "已关闭"),
    DONE(5, "已完成");

    public Integer id;
    public String text;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    private VendorOrderStatusV1Enum(Integer id, String text) {

        this.id = id;
        this.text = text;
    }

    public static VendorOrderStatusV1Enum get(Integer code) {

        for (VendorOrderStatusV1Enum c : VendorOrderStatusV1Enum.values()) {
            if (c.id.toString().equals(code.toString())) {
                return c;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return text;
    }
}
